# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=pv
pkgver=1.6.6
pkgrel=1
pkgdesc="CLI tool for monitoring the progress of data through a pipeline"
url="http://www.ivarch.com/programs/pv.shtml"
arch="all"
license="Artistic-2.0"
subpackages="$pkgname-doc"
source="https://www.ivarch.com/programs/sources/pv-$pkgver.tar.bz2"

builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="cc841b4bd00e4e8fcaed97da094ebac4a11af1c3f843ce5f73d0c3ab20aca29498c6b1a224c653d40127304d8269d96f413df66b980809e9278ff9544c834a26  pv-1.6.6.tar.bz2"
